const LoginApi = function () {
    const baseUrl = 'http://101.42.178.195:8080/Login';
    return {
        /**
         * 学生登录
         * @param uid
         * @param pwd
         * @returns {Promise<*>}
         */
        async studentLogin(uid, pwd) {
            return await axios.post(`${baseUrl}/StuLogin?uid=${uid}&pwd=${pwd}`)
        },
        /**
         * 学院登录
         * @param uid
         * @param pwd
         * @returns {Promise<*>}
         */
        async collegeLogin(uid, pwd) {
            return await axios.post(`${baseUrl}/CollLogin`, {
                uid, pwd
            })
        },
        /**
         * 公司登录
         * @param uid
         * @param pwd
         * @returns {Promise<*>}
         */
        async companyLogin(uid, pwd) {
            return await axios.post(`${baseUrl}/ComLogin`, {
                uid, pwd
            })
        },

        /**
         * 学校登录
         * @param uid
         * @param pwd
         * @returns {Promise<*>}
         */
        async schoolLogin(uid, pwd) {
            return await axios.post(`${baseUrl}/UniLogin`, {
                uid, pwd
            })
        },

    }
}();